package com.snail.billing.json;

import org.json.JSONException;
import org.json.JSONObject;


public class JsonCreateImprestOrder extends JsonBase {

	private String sessionId;
	private String account;
	private String orderNo;

	public JsonCreateImprestOrder(String jsonString) {
		super(jsonString);
		try {
			if (getCode() == 1) {
				JSONObject json = new JSONObject(jsonString);
				if (json.has("sessionId")) {
					setSessionId(json.getString("sessionId"));
				}
				if (json.has("orderNo")) {
					setOrderNo(json.getString("orderNo"));
				}
				if (json.has("account")) {
					setAccount(json.getString("account"));
				}
			}
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

}
